<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<%
	xMode = Request("xMode")
	
	isPerm = ""
	isAdminPerm = "none"
	If Request.Cookies("S_level") = "05" then 
		isPerm = "none"
	End If
	If Request.Cookies("S_level") = "50" then 
		isAdminPerm = ""
	End If
	
	afterOption = mkComCombo("0009")		'## 후처리 콤보
	srcOption = mkComCombo("0010")	   	'## 재질 콤보
	'## 사용자 콤보
	userSql = "SELECT userId, userNm FROM tblUser WHERE delYN='N' AND gwYN='Y' ORDER BY userNm"
	userOption = mkSQLCombo(userSql)
	
%>
<!-- #include virtual=/inc/header_cross.inc.asp -->  

<script language="javascript">    
		 $(document).ready(function() {
			  var clareCalendar = {
			   monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
			   dayNamesMin: ['일','월','화','수','목','금','토'],
			   weekHeader: 'Wk',
			   dateFormat: 'yy-mm-dd',														// 날짜형식(2012-03-03)
			   autoSize: false,																	//자동리사이즈(false 이면 상위 정의에 따름)
			   changeMonth: true,															// true이면 월변경, false이면 월변경못함
			   changeYear: true,																// true이면 년변경, false이면 년변경못함
			   showMonthAfterYear: true,													//년 뒤에 월 표시
			   buttonImageOnly: true,														//이미지표시
			   //buttonText: '달력선택',														//버튼 텍스트 표시
			   //buttonImage: '/calendar.gif',												//이미지주소
			   //showOn: "both",																//엘리먼트와 이미지 동시 사용(both,button)
			   yearRange: 'c-99:c+99',													//1990년부터 2020년까지
			   maxDate: '+2Y',																	// 오늘부터6년후날짜까지만, '+0d' 오늘 이전 날짜만 선택
			   minDate: '-5y'
			  };
			  $("#workDt").datepicker(clareCalendar);
			  $("#outDt").datepicker(clareCalendar);
			  $("#findStartDt").datepicker(clareCalendar);
			  $("#findEndDt").datepicker(clareCalendar);
			  $("img.ui-datepicker-trigger").attr("style","margin-left:5px; vertical-align:middle; cursor:pointer;"); //이미지버튼 style적용
			  $("#ui-datepicker-div").hide(); //자동으로 생성되는 div객체 숨김  
		});
		
	   $(window).load(function(){
	       intervalNotice();
	    });     
</script>

<BODY topmargin="0" leftmargin="0">
<!-- #include virtual=/inc/menu.inc.asp -->  

<br>
<!-- 검색 영역 시작 -->
<div style="text-align:left">
<table border="0" cellpadding="0" cellspacing="0" width="1110" style="margin-bottom:10px">
	<tr>
		<td width="210">
			<table border="0" cellpadding="0" cellspacing="0" width="120" style="margin-left:5px" id="orderSubMenu">
				<tr>
					<td width="40%" class="lTD_trbl" onclick="mvPage('jobOrder')" style="height:26px;text-align:center; background-color:#eaf2fd;CURSOR:hand;">지 시</td>
					<td width="60%" class="lTD_trb0" onclick="mvPage('extraOrder')" style="height:26px;text-align:center;font-weight:bold;BORDER-TOP: #ff3300 5px solid;background-color:#eaf2fd;CURSOR:hand;">가공(2팀)</td>
				</tr>
			</table>
		</td>
		<td align="right">
			<table border="0" cellpadding="0" cellspacing="0" width="970">
				<tr>
					<td width="100%" class="lTD_trbl" style="height:26px;padding-left:10px;color:#6600ff; background-color:#eaf2fd;text-align:left" id="topNotice">&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="1110" style="margin-left:5px;">
	<tr height="40">
		<td style="padding: 0px 0 0px 10px;background-image:url(/inc/layout/panel-title-light-bg.gif);font-weight:bold;text-align:left" width="100%" class="lTD_trbl">
			<select id="findKeyset"><option value="workDt">작업일</option><option value="outDt">납품일</option></select> &nbsp; 
			<input type="text" id="findStartDt" class="inputBox" style="width:80px;" value="<%=dateadd("m",-1, date())%>"> - <input type="text" id="findEndDt" class="inputBox" style="width:80px;margin-right:10px;" value="<%=date()%>">
			제품명 <input type="text" name="findPrdNm" id="findPrdNm" class="inputBox" style="width:120px;ime-Mode:active"> &nbsp;
			<input type="button" onClick="grid01List()" value="검 색" class="inputBtn">&nbsp;
			<input type="button" onClick="fnSearchReset()" value="Reset" class="inputBtn">
		</td>
	</tr>
</table>
</div>
<!-- 검색 영역 끝 -->

<br>

<!-- 그리드 시작 -->
<div style="text-align:left">
<table border="0" cellpadding="0" cellspacing="0" width="1235" style="margin-left:5px;text-align:left">
	<tr>
		<td width="100%" class="lTD_trbl" valign="top" style="padding: 5px 5px 5px 5px;">
			<table border="0" cellpadding="0" cellspacing="0" width="590">
				<tr height="24">
					<td style="padding: 0 0 0 0;text-align:left" width="300"><input type="text" class="subTitle" style="width:80px;" value="가공(2팀)" ReadOnly>&nbsp;<a href="javascript:grid01List()">[새로고침]</a> &nbsp; </td>
					<td style="padding: 0 20 0 0;" align="right" width="290"><B>Total :</B> <span id="grid01Cnt" style="font-weight:bold">0</span></td>
				</tr>
			</table>
			<table border="0" cellpadding="0" cellspacing="0" width="590"><tr><td style="background-color:#3366CC;height:2px"></td></tr></table>	
			<div id="grid1">
				<div id="gridHeader1">
					<div style="width:40px"><p>No.</p></div>
					<div style="width:120px"><p>제품명</p></div>
					<div style="width:75px"><p>작업일</p></div>
					<div style="width:75px"><p>납품일</p></div>
					<div style="width:140px"><p>거래처</p></div>
					<div style="width:60px"><p>수량</p></div>
					<div style="width:54px"><p>생산</p></div>
					<div style="width:18px">&nbsp;</div>
				</div>
				<div id="noResult1">
					<div><p>결과가 없습니다.</p></div>
				</div>
				<div id="gridBody1" style="display:none;">								
				</div>
				<div id="gridTail1" style="">
					<div class="term"></div>
					<div id="pager1"></div>
				</div>
			</div>		
		</td>
		<td valign="top" style="text-align:center; padding-left:5px">					
			<table border="0" cellpadding="0" cellspacing="0" width="500">
				<tr>
				  <td width="100%" class="lTD_trbl" style="padding: 5px 5px 5px 5px; text-align:center">
					<table border="0" cellpadding="0" cellspacing="0" width="490">
						<input type="hidden" id="lotSeq">
						<tr>
							<td height="30" width="490" class="lTD_00b0" style="padding: 0 0 0 20px; text-align:left; font-weight:bold">
								<div style="float:left;width:90px;text-align:right;margin-right:5px;"><p style="margin-top:8px">제 &nbsp; 품 &nbsp; 명  : </p></div> 
								<div style="float:left;width:365px;text-align:left;">
									<p style="margin-top:2px;">
									<input type="text" id="prdNm" size="30" class="specialBox" style="margin-right:45px;">
									<select id="workUid" style="width:120px">
										<option value="">-작업자-</option>
										<%=userOption%>
									</select>
									</p>
								</div>
							</td>
						</tr>
						<tr style="display:<%=isPerm%>">
							<td height="30" width="490" class="lTD_00b0" style="padding: 0 0 0 20px; text-align:left; font-weight:bold;">
								<div style="float:left;width:90px;text-align:right;margin-right:5px;"><p style="margin-top:8px">발 &nbsp; 주 &nbsp; 처  : </p></div> 
								<div style="float:left;width:365px;text-align:left;">
									<p style="margin-top:2px;">
									<input type="text" id="compNm" size="22" class="inputBox" onblur="fnFindCompany(this.value,'','compCd')"> 
									<select name="compCd" id="compCd" style="width:209px"><option value="">--거래처--</option></select>
									</p>
								</div>
							</td>
						</tr>
						<tr>
							<td height="30" width="490" class="lTD_00b0" style="padding: 0 0 0 20px; text-align:left; font-weight:bold;">
								<div style="float:left;width:90px;text-align:right;margin-right:5px;"><p style="margin-top:8px">작 &nbsp; 업 &nbsp; 일  : </p></div> 
								<div style="float:left;width:130px;text-align:left;"><p style="margin-top:2px"><input type="text" id="workDt" size="12" class="inputBox" value="<%=date()%>"></p></div> 
								<div style="float:left;width:90px;text-align:right;margin-right:5px;"><p style="margin-top:8px">납 &nbsp; 품 &nbsp; 일  : </p></div> 
								<div style="float:left;width:130px;text-align:left;"><p style="margin-top:2px"><input type="text" id="outDt" size="12" class="inputBox" value="<%=date()%>"></p></div> 
							</td>
						</tr>
						<tr>
							<td height="30" width="490" class="lTD_00b0" style="padding: 0 0 0 20px; text-align:left; font-weight:bold;">
								<div style="float:left;width:90px;text-align:right;margin-right:5px;"><p style="margin-top:8px">도 &nbsp; 면 &nbsp; 명  : </p></div> 
								<div style="float:left;width:130px;text-align:left;"><p style="margin-top:2px"><input type="text" id="planNm" size="18" class="inputBox"></p></div> 
								<div style="float:left;width:90px;text-align:right;margin-right:5px;"><p style="margin-top:8px">재 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; 질  : </p></div> 
								<div style="float:left;width:130px;text-align:left;">
									<p style="margin-top:2px">
										<select id="source">
											<option value="">-재 질-</option>
											<%=srcOption%>
										</select>
									</p>
								</div> 
							</td>
						</tr>
						<tr>
							<td height="30" width="490" class="lTD_00b0" style="padding: 0 0 0 20px; text-align:left; font-weight:bold;">
								<div style="float:left;width:90px;text-align:right;margin-right:5px;"><p style="margin-top:8px">수 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; 량  : </p></div> 
								<div style="float:left;width:130px;text-align:left;"><p style="margin-top:2px"><input type="text" id="qty" size="10" class="inputBox" style="text-align:right"></p></div> 
								<div style="float:left;width:90px;text-align:right;margin-right:5px;"><p style="margin-top:8px">후 &nbsp; 처 &nbsp; 리  : </p></div> 
								<div style="float:left;width:130px;text-align:left;">
									<p style="margin-top:2px">
										<select id="afterDeal">
											<option value="">-후처리-</option>
											<%=afterOption%>
										</select>
									</p>
								</div> 
							</td>
						</tr>
						<tr>
							<td width="490" class="lTD_00b0" style="padding: 10px 0 10px 20px; text-align:left; font-weight:bold">
								<textarea name="remarks" id="remarks" class="inputBox" style="width:450px; height:120px"></textarea>

							</td>
						</tr>
						<tr>
							<td height="30" width="490" class="lTD_00b0" style="padding: 0 0 0 20px; text-align:left; font-weight:bold">
								<select id="flag">
									<option value="Y">생산중</option>
									<option value="C">생산완료</option>
									<option value="H">생산정지</option>
									<option value="N">삭제</option>
								</select> &nbsp; &nbsp;<input type="text" id="accessInfo" style="font-weight:normal;width:120px; border:0px;margin-right:135px">
								<span style="text-align:right">
								<input type="button" value="저장" class="inputBtn" onClick="fnSave()"> 
								<input type="button" value="신규" class="inputBtn" onClick="fnReset()">
								</span>
							</td>
						</tr>
					</table>
				  </td>
				</tr>
			</table>
		</td>		
		<td width="265">
			<table border="0" cellpadding="0" cellspacing="0" width="147">
				<tr>
					<td>&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</div>
<div id="noticeContents" style="display:none;position:absolute;width:470px;background-color:#feecd3;border:#ff6600 1px solid;padding:10px 10px 10px 10px; z-index:2">
	<table cellpadding="0" cellspacing="0" border="0" width="450">
		<tr>
			<td style="font-weight:bold;height:40px"> &nbsp; [공지사항] <span id="vTitles"></span></td>
		</tr>
			<td style="text-align:center"><textarea id="contents" class="inputBox" style="width:440px; height:300px" readonly="readonly"></textarea></td>
		</tr>
		<tr>
			<td colspan="2" width="100%" style="text-align:right;height:28px;padding-right:8px;"><input type="button" onClick="fnLayerClose('noticeContents')" value="닫기" class="inputBtn"></td>
		</tr>
	</table>
</div>
<!-- 그리그 끝 -->

<script language="javascript">
	setMainMenu();
//	//## 테스트를 위한 기본 값세팅	
//	$("#prdNm").val("연습00");
//	$("#etcPrdCd").val("TEST01-00");
//	$("#remarks").val("연습중\r\nThis is testing....");
</script>
</BODY>
</HTML>